Optimal. Leaf size=159 \[ \frac {c^2 x \sqrt {d x-c} \sqrt {c+d x} \left (2 a d^2+b c^2\right )}{16 d^4}+\frac {x (d x-c)^{3/2} (c+d x)^{3/2} \left (2 a d^2+b c^2\right )}{8 d^4}-\frac {c^4 \left (2 a d^2+b c^2\right ) \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{8 d^5}+\frac {b x^3 (d x-c)^{3/2} (c+d x)^{3/2}}{6 d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {460, 90, 12, 38, 63, 217, 206} \[ \frac {c^2 x \sqrt {d x-c} \sqrt {c+d x} \left (2 a d^2+b c^2\right )}{16 d^4}+\frac {x (d x-c)^{3/2} (c+d x)^{3/2} \left (2 a d^2+b c^2\right )}{8 d^4}-\frac {c^4 \left (2 a d^2+b c^2\right ) \tanh ^{-1}\left (\frac {\sqrt {d x-c}}{\sqrt {c+d x}}\right )}{8 d^5}+\frac {b x^3 (d x-c)^{3/2} (c+d x)^{3/2}}{6 d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 38
Rule 63
Rule 90
Rule 206
Rule 217
Rule 460
Rubi steps
\begin {align*} \int x^2 \sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right ) \, dx &=\frac {b x^3 (-c+d x)^{3/2} (c+d x)^{3/2}}{6 d^2}+\frac {1}{2} \left (2 a+\frac {b c^2}{d^2}\right ) \int x^2 \sqrt {-c+d x} \sqrt {c+d x} \, dx\\ &=\frac {\left (b c^2+2 a d^2\right ) x (-c+d x)^{3/2} (c+d x)^{3/2}}{8 d^4}+\frac {b x^3 (-c+d x)^{3/2} (c+d x)^{3/2}}{6 d^2}+\frac {\left (b c^2+2 a d^2\right ) \int c^2 \sqrt {-c+d x} \sqrt {c+d x} \, dx}{8 d^4}\\ &=\frac {\left (b c^2+2 a d^2\right ) x (-c+d x)^{3/2} (c+d x)^{3/2}}{8 d^4}+\frac {b x^3 (-c+d x)^{3/2} (c+d x)^{3/2}}{6 d^2}+\frac {\left (c^2 \left (b c^2+2 a d^2\right )\right ) \int \sqrt {-c+d x} \sqrt {c+d x} \, dx}{8 d^4}\\ &=\frac {c^2 \left (b c^2+2 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{16 d^4}+\frac {\left (b c^2+2 a d^2\right ) x (-c+d x)^{3/2} (c+d x)^{3/2}}{8 d^4}+\frac {b x^3 (-c+d x)^{3/2} (c+d x)^{3/2}}{6 d^2}-\frac {\left (c^4 \left (b c^2+2 a d^2\right )\right ) \int \frac {1}{\sqrt {-c+d x} \sqrt {c+d x}} \, dx}{16 d^4}\\ &=\frac {c^2 \left (b c^2+2 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{16 d^4}+\frac {\left (b c^2+2 a d^2\right ) x (-c+d x)^{3/2} (c+d x)^{3/2}}{8 d^4}+\frac {b x^3 (-c+d x)^{3/2} (c+d x)^{3/2}}{6 d^2}-\frac {\left (c^4 \left (b c^2+2 a d^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {2 c+x^2}} \, dx,x,\sqrt {-c+d x}\right )}{8 d^5}\\ &=\frac {c^2 \left (b c^2+2 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{16 d^4}+\frac {\left (b c^2+2 a d^2\right ) x (-c+d x)^{3/2} (c+d x)^{3/2}}{8 d^4}+\frac {b x^3 (-c+d x)^{3/2} (c+d x)^{3/2}}{6 d^2}-\frac {\left (c^4 \left (b c^2+2 a d^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{8 d^5}\\ &=\frac {c^2 \left (b c^2+2 a d^2\right ) x \sqrt {-c+d x} \sqrt {c+d x}}{16 d^4}+\frac {\left (b c^2+2 a d^2\right ) x (-c+d x)^{3/2} (c+d x)^{3/2}}{8 d^4}+\frac {b x^3 (-c+d x)^{3/2} (c+d x)^{3/2}}{6 d^2}-\frac {c^4 \left (b c^2+2 a d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{8 d^5}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.19, size = 135, normalized size = 0.85 \[ \frac {\sqrt {d x-c} \sqrt {c+d x} \left (3 \left (2 a c^3 d^2+b c^5\right ) \sin ^{-1}\left (\frac {d x}{c}\right )+d x \sqrt {1-\frac {d^2 x^2}{c^2}} \left (b \left (-3 c^4-2 c^2 d^2 x^2+8 d^4 x^4\right )-6 a d^2 \left (c^2-2 d^2 x^2\right )\right )\right )}{48 d^5 \sqrt {1-\frac {d^2 x^2}{c^2}}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.50, size = 112, normalized size = 0.70 \[ \frac {{\left (8 \, b d^{5} x^{5} - 2 \, {\left (b c^{2} d^{3} - 6 \, a d^{5}\right )} x^{3} - 3 \, {\left (b c^{4} d + 2 \, a c^{2} d^{3}\right )} x\right )} \sqrt {d x + c} \sqrt {d x - c} + 3 \, {\left (b c^{6} + 2 \, a c^{4} d^{2}\right )} \log \left (-d x + \sqrt {d x + c} \sqrt {d x - c}\right )}{48 \, d^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.46, size = 432, normalized size = 2.72 \[ \frac {40 \, {\left (\sqrt {d x + c} \sqrt {d x - c} {\left ({\left (d x + c\right )} {\left (\frac {2 \, {\left (d x + c\right )}}{d^{2}} - \frac {7 \, c}{d^{2}}\right )} + \frac {9 \, c^{2}}{d^{2}}\right )} + \frac {6 \, c^{3} \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right )}{d^{2}}\right )} a c + 2 \, {\left ({\left ({\left (2 \, {\left (d x + c\right )} {\left (3 \, {\left (d x + c\right )} {\left (\frac {4 \, {\left (d x + c\right )}}{d^{4}} - \frac {21 \, c}{d^{4}}\right )} + \frac {133 \, c^{2}}{d^{4}}\right )} - \frac {295 \, c^{3}}{d^{4}}\right )} {\left (d x + c\right )} + \frac {195 \, c^{4}}{d^{4}}\right )} \sqrt {d x + c} \sqrt {d x - c} + \frac {90 \, c^{5} \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right )}{d^{4}}\right )} b c + 10 \, {\left ({\left ({\left (d x + c\right )} {\left (2 \, {\left (d x + c\right )} {\left (\frac {3 \, {\left (d x + c\right )}}{d^{3}} - \frac {13 \, c}{d^{3}}\right )} + \frac {43 \, c^{2}}{d^{3}}\right )} - \frac {39 \, c^{3}}{d^{3}}\right )} \sqrt {d x + c} \sqrt {d x - c} - \frac {18 \, c^{4} \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right )}{d^{3}}\right )} a d + {\left ({\left ({\left (2 \, {\left ({\left (d x + c\right )} {\left (4 \, {\left (d x + c\right )} {\left (\frac {5 \, {\left (d x + c\right )}}{d^{5}} - \frac {31 \, c}{d^{5}}\right )} + \frac {321 \, c^{2}}{d^{5}}\right )} - \frac {451 \, c^{3}}{d^{5}}\right )} {\left (d x + c\right )} + \frac {745 \, c^{4}}{d^{5}}\right )} {\left (d x + c\right )} - \frac {405 \, c^{5}}{d^{5}}\right )} \sqrt {d x + c} \sqrt {d x - c} - \frac {150 \, c^{6} \log \left ({\left | -\sqrt {d x + c} + \sqrt {d x - c} \right |}\right )}{d^{5}}\right )} b d}{240 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.07, size = 240, normalized size = 1.51 \[ \frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (8 \sqrt {d^{2} x^{2}-c^{2}}\, b \,d^{5} x^{5} \mathrm {csgn}\relax (d )+12 \sqrt {d^{2} x^{2}-c^{2}}\, a \,d^{5} x^{3} \mathrm {csgn}\relax (d )-2 \sqrt {d^{2} x^{2}-c^{2}}\, b \,c^{2} d^{3} x^{3} \mathrm {csgn}\relax (d )-6 a \,c^{4} d^{2} \ln \left (\left (d x +\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )\right )-6 \sqrt {d^{2} x^{2}-c^{2}}\, a \,c^{2} d^{3} x \,\mathrm {csgn}\relax (d )-3 b \,c^{6} \ln \left (\left (d x +\sqrt {d^{2} x^{2}-c^{2}}\, \mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )\right )-3 \sqrt {d^{2} x^{2}-c^{2}}\, b \,c^{4} d x \,\mathrm {csgn}\relax (d )\right ) \mathrm {csgn}\relax (d )}{48 \sqrt {d^{2} x^{2}-c^{2}}\, d^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.67, size = 192, normalized size = 1.21 \[ \frac {{\left (d^{2} x^{2} - c^{2}\right )}^{\frac {3}{2}} b x^{3}}{6 \, d^{2}} - \frac {b c^{6} \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{16 \, d^{5}} - \frac {a c^{4} \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - c^{2}} d\right )}{8 \, d^{3}} + \frac {\sqrt {d^{2} x^{2} - c^{2}} b c^{4} x}{16 \, d^{4}} + \frac {\sqrt {d^{2} x^{2} - c^{2}} a c^{2} x}{8 \, d^{2}} + \frac {{\left (d^{2} x^{2} - c^{2}\right )}^{\frac {3}{2}} b c^{2} x}{8 \, d^{4}} + \frac {{\left (d^{2} x^{2} - c^{2}\right )}^{\frac {3}{2}} a x}{4 \, d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 42.57, size = 1681, normalized size = 10.57 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \left (a + b x^{2}\right ) \sqrt {- c + d x} \sqrt {c + d x}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________